package com.hsgene.product.constants;

/**
 * @Description: //TODO
 * @ProjectName: hdas-geneshop
 * @Package: com.hsgene.product.constants
 * @Author: FX
 * @CreateDate: 2018/10/19 11:15
 * @Version: 1.0
 * Copyright: Copyright (c) 2018
 */
public enum ReplyAdminType {
    ORDINARY_REPLY(0,"普通回复"),
    REPLY_REPLY(1,"后台管理元回复"),
    UNDEFINED(-1, "未定义的类型");
    /**
     * 编码
     */
    private final int code;

    /**
     * 描述
     */
    private final String desc;

    public static ReplyAdminType getEnum(int code) {
        for (ReplyAdminType type : values()) {
            if (type.code==code) {
                return type;
            }
        }
        return UNDEFINED;
    }

    ReplyAdminType(int code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public int getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

}
